package top.shiyiri.team.junit;

import org.junit.Test;
import top.shiyiri.team.domain.Employee;
import top.shiyiri.team.service.NameListService;
import top.shiyiri.team.service.TeamException;

public class NameListServiceTest {

    @Test
    public void testGetAllEmployees() {

        NameListService nameListService = new NameListService();
        Employee[] employees = nameListService.getEmployees();
        for (int i = 0; i < employees.length; i ++) {
            System.out.println(employees[i]);
        }

    }


    @Test
    public void testGetEmployee() {
        NameListService service = new NameListService();
        int id = 18;
        try {
            Employee employee = service.getEmployee(id);
            System.out.println(employee);
        } catch (TeamException e) {
            e.printStackTrace();
        }
    }
}
